<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	template="/WEB-INF/template.xhtml">
	<ui:define name="title">Security Audit</ui:define>
	<ui:define name="body">
		<h:form id="mainForm">
			<p:dataTable id="table" var="row"
				value="#{hsmProxySecurityAudit.list}" rows="15" paginator="true"
				resizableColumns="true">
				<p:column>
					<f:facet name="header">Id</f:facet>
					<h:outputText value="#{row.id}" />
				</p:column>
				<p:column>
					<f:facet name="header">Date</f:facet>
					<h:outputText value="#{row.created}">
						<f:convertDateTime type="both" timeStyle="full" />
					</h:outputText>
				</p:column>
				<p:column>
					<f:facet name="header">Event</f:facet>
					<h:outputText value="#{row.securityEvent}" />
				</p:column>
				<p:column>
					<f:facet name="header">Host</f:facet>
					<h:outputText value="#{row.host}" />
				</p:column>
				<p:column>
					<f:facet name="header">Subject</f:facet>
					<h:outputText value="#{row.subject}" />
				</p:column>
				<p:column>
					<f:facet name="header">Outcome</f:facet>
					<h:outputText value="#{row.outcome}" />
				</p:column>
				<f:facet name="footer">
					<h:panelGroup style="display:block; text-align: left;">
						<p:commandLink id="deleteButton" onclick="deleteDialog.show();"
							styleClass="ui-icon ui-icon-trash" style="display:inline-block;" />
						<p:tooltip for="deleteButton" value="Delete security audit..." />
					</h:panelGroup>
				</f:facet>
			</p:dataTable>
		</h:form>

		<p:confirmDialog header="Delete security audit"
			message="Are you sure to delete the security audit records?"
			severity="alert" widgetVar="deleteDialog">
			<h:form id="deleteForm">
				<p:commandButton id="deleteButton" value="Yes"
					actionListener="#{hsmProxySecurityAudit.removeAll}"
					oncomplete="deleteDialog.hide();"
					update=":messages,:mainForm:table" />
				<p:commandButton value="No" onclick="deleteDialog.hide();" />
			</h:form>
		</p:confirmDialog>

	</ui:define>
</ui:composition>